<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
    <TITLE>Image Browser</TITLE>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link charset="utf-8" rel="stylesheet" href="resource/css/browser.css" />
    <script charset="utf-8" type="text/javascript" src="resource/script/Parameter.js"></script>
    <script charset="utf-8" type="text/javascript" src="resource/script/ajax.js"></script>
    <script charset="utf-8" type="text/javascript" src="resource/script/browser.js"></script>
</HEAD>

<BODY onload="getServerSideConfig()">
<!--<input type="hidden" id="folder-path" value="public"/>-->
<table id="root" class="root" cellpadding="0" cellspacing="0">
    <tr valign="top">
        <td class="left">
            <ul>
                <li><a id="my-images" class="nav-item-selected" href="javascript:void(0)" onclick="changeFolder ('private')">我的图片</a></li>
                <li><a id="public-images" class="nav-item" style="display: none" href="javascript:void(0)" onclick="changeFolder ('public')">公共图片</a></li>
            </ul>
        </td>
        <td class="right">
            <div class="top">
                <div class="operation-panel">
                    <a href="javascript:void(0)" onclick="showDialog ('create-folder')" class="button">新建目录</a>
                    <a href="javascript:void(0)" onclick="showUploadDialog ()" class="button">上传图片</a>
                </div>
                <div class="title-panel">
                    <h1 id="folder-name">图片库</h1>
                    <div id="location-bar"></div>
                </div>
                <div class="clear"></div>
            </div>
            <div id="browser" class="browser">
            </div>
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <div class="bottom">
                <div id="info-panel">
                    <div id="image-sample"></div>
                    <div id="info"></div>
                </div>
                <div class="operation-panel">
                    <a href="javascript:void(0)" onclick="selectImage ()" class="button">确定</a>
                    <a href="javascript:void(0)" onclick="window.close ()" class="button">取消</a>
                </div>
                <div class="clear"></div>
            </div>
        </td>
    </tr>
</table>
<div id="upload-panel" class="dialog-panel">
    <form enctype="multipart/form-data" method="post" id="uploadForm" target="upload_frame">
        <input type="hidden" id="folderName" name="folderName"/>
        <p style="margin-bottom:10px;">请选择图片: <input type="file" name="file" id="file"/></p>
        <p class="detail">支持的图片类型为：
            <span class="high-light">GIF</span>,
            <span class="high-light">JPEG</span>,
            <span class="high-light">PNG</span>
        </p>
        <div class="operation-panel">
            <a href="javascript:void(0)" onclick="uploadFile ()" class="button">上传</a>
            <a href="javascript:void(0)" onclick="closeUploadDialog ()" class="button">取消</a>
            <div class="clear"></div>
        </div>
    </form>
</div>
<div id="create-folder" class="dialog-panel">
    <p>
        <label for="txt-folder-name">请输入目录名称</label>:
        <input type="text" id="txt-folder-name" style="width: 100%"/>
    </p>
    <p class="detail">目录名称不能包含
        <span class="high-light">/</span>,
        <span class="high-light">\</span>,
        <span class="high-light">?</span>,
        <span class="high-light">*</span> 和
        <span class="high-light">空格</span>
    </p>
    <div class="operation-panel">
        <a href="javascript:void(0)" onclick="createFolder ()" class="button">确定</a>
        <a href="javascript:void(0)" onclick="closeDialog ('create-folder')" class="button">取消</a>
        <div class="clear"></div>
    </div>
</div>
<iframe id="upload_frame" name="upload_frame" style="display:none"></iframe>
</BODY>
</HTML>